package com.dynaBlaster;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class DynaBlaster extends Activity {

	private DynaView mDynaView;

	private static String ICICLE_KEY = "dynaBlaster-view";

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.dyna_layout);

		mDynaView = (DynaView) findViewById(R.id.dyna);
		mDynaView.setTextView((TextView) findViewById(R.id.text));

		mDynaView.setOnTouchListener(mDynaView);
		// mDynaView.set

		if (savedInstanceState == null) {
			// We were just launched -- set up a new game
			mDynaView.setMode(DynaView.READY);
		} else {
			// We are being restored
			Bundle map = savedInstanceState.getBundle(ICICLE_KEY);
			if (map != null) {
				mDynaView.restoreState(map);
			} else {
				mDynaView.setMode(DynaView.PAUSE);
			}
		}
	}

}
